wayland: Don't get the shell surface twice
authorMatthias Clasen <mclasen@redhat.com>
Sat, 13 Apr 2013 21:20:05 +0000 (17:20 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 13 Apr 2013 21:20:05 +0000 (17:20 -0400)
Noticed by Pu Xingyu,
https://bugzilla.gnome.org/show_bug.cgi?id=697947

gdk/wayland/gdkwindow-wayland.c

index 4b651d792da5465c60a54c8b2da0b1dff241f823..a04915e161745131da795bf99b62f036b9d1664a 100644 (file)
@@ -714,7 +714,9 @@ gdk_wayland_window_show (GdkWindow *window, gboolean already_mapped)
       wl_surface_set_user_data(impl->surface, window);
     }
 
-  if (!impl->use_custom_surface && display_wayland->shell)
+  if (!impl->shell_surface &&
+      !impl->use_custom_surface &&
+      display_wayland->shell)
     {
       impl->shell_surface = wl_shell_get_shell_surface (display_wayland->shell,
                                                         impl->surface);